package com.baizhi.controller;

import com.baizhi.entity.Grade;
import com.baizhi.service.GradeService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Tag(name="班级管理模块",description = "管理管理模块的控制器")
public class GradeController {

    @Autowired
    private GradeService gradeService;

    @GetMapping("/grade/all")
    @Operation(description = "获取班级所有信息")
    public List<Grade> getGrades(){
        List<Grade> list = gradeService.list();
        return list;

    }
}
